<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class XmlUtils</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class XmlUtils</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A collection of utility methods for working with XML.</p>
		<p class="notes">
			Located in <a class="field" href="_Ads---Common---Util---XmlUtils.php.html">/Ads/Common/Util/XmlUtils.php</a> (line <span class="field">39</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
												<div class="method-definition">
					static 						<span class="method-result">Object</span>
										<a href="#ConvertDocumentToObject" title="details" class="method-name">ConvertDocumentToObject</a>
											(<span class="var-type">DOMDocument</span>&nbsp;<span class="var-name">$document</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">DOMDocument</span>
										<a href="#ConvertObjectToDocument" title="details" class="method-name">ConvertObjectToDocument</a>
											(<span class="var-type">Object</span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$rootElementName</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">DOMDocument</span>
										<a href="#GetDomFromXml" title="details" class="method-name">GetDomFromXml</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$xml</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#GetXmlFromDom" title="details" class="method-name">GetXmlFromDom</a>
											(<span class="var-type">DOMDocument</span>&nbsp;<span class="var-name">$document</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">boolean</span>
										<a href="#HandleXmlError" title="details" class="method-name">HandleXmlError</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$errno</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$errstr</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$errfile</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$errline</span>)
									</div>
																<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#PrettyPrint" title="details" class="method-name">PrettyPrint</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$xml</span>)
									</div>
								
																																																				</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodConvertDocumentToObject" id="ConvertDocumentToObject"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method ConvertDocumentToObject</span> (line <span class="line-number">87</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts a DOMDocument to a stdClass object, where each element under  the root node is a field. Atribute values are ignored.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the converted object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">Object</span>
		<span class="method-name">
			ConvertDocumentToObject
		</span>
					(<span class="var-type">DOMDocument</span>&nbsp;<span class="var-name">$document</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DOMDocument</span>
				<span class="var-name">$document</span><span class="var-description">: the document to convert</span>			</li>
				</ul>
		
			
	</div>
<a name="methodConvertObjectToDocument" id="ConvertObjectToDocument"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method ConvertObjectToDocument</span> (line <span class="line-number">154</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Converts an object to a DOMDocument. The root element name is passed in as  a parameter, and each field of the object becomes a child element. Array  values are represented by multiples instances of that element. Methods on  the object are ignored. There is no support for XML attributes.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the document representing the object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">DOMDocument</span>
		<span class="method-name">
			ConvertObjectToDocument
		</span>
					(<span class="var-type">Object</span>&nbsp;<span class="var-name">$object</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$rootElementName</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Object</span>
				<span class="var-name">$object</span><span class="var-description">: the object to serialize</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$rootElementName</span><span class="var-description">: the name of the root element</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetDomFromXml" id="GetDomFromXml"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method GetDomFromXml</span> (line <span class="line-number">46</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the DOMDocument of the <var>$xml</var>.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the DOMDocument of the XML</li>
				<li><span class="field">throws:</span> DOMException if the DOM could not be loaded</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">DOMDocument</span>
		<span class="method-name">
			GetDomFromXml
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$xml</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$xml</span><span class="var-description">: the XML to create a DOMDocument from</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGetXmlFromDom" id="GetXmlFromDom"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method GetXmlFromDom</span> (line <span class="line-number">60</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Gets the XML represenation of the document.</p>
	<ul class="tags">
				<li><span class="field">return:</span> the XML represenation of the document</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">string</span>
		<span class="method-name">
			GetXmlFromDom
		</span>
					(<span class="var-type">DOMDocument</span>&nbsp;<span class="var-name">$document</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">DOMDocument</span>
				<span class="var-name">$document</span><span class="var-description">: the document to convert</span>			</li>
				</ul>
		
			
	</div>
<a name="methodHandleXmlError" id="HandleXmlError"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static method HandleXmlError</span> (line <span class="line-number">232</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Caputures the warnings thrown by the loadXML function to create a proper  DOMException.</p>
	<ul class="tags">
				<li><span class="field">return:</span> <var>FALSE</var> if the normal error handler should      continue</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">boolean</span>
		<span class="method-name">
			HandleXmlError
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$errno</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$errstr</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$errfile</span>, <span class="var-type">integer</span>&nbsp;<span class="var-name">$errline</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$errno</span><span class="var-description">: contains the level of the error raised, as an integer</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$errstr</span><span class="var-description">: contains the error message, as a string</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$errfile</span><span class="var-description">: contains the filename that the error was raised in,      as a string</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$errline</span><span class="var-description">: contains the line number the error was raised at,      as an integer</span>			</li>
				</ul>
		
			
	</div>
<a name="methodPrettyPrint" id="PrettyPrint"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static method PrettyPrint</span> (line <span class="line-number">70</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns a pretty printed XML. If the XML cannot be loaded a string  stripped of any newlines is returned.</p>
	<ul class="tags">
				<li><span class="field">return:</span> a pretty printed string</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
	    static
		<span class="method-result">string</span>
		<span class="method-name">
			PrettyPrint
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$xml</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$xml</span><span class="var-description">: the XML to pretty print</span>			</li>
				</ul>
		
			
	</div>

						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.4</a>
	</p>
	</div></body>
</html>